import sys, os, codecs

duck_file=r'D:\me\software\wubi\小鸭五笔-五笔词库.txt'

if __name__=='__main__':
    if len(sys.argv)==1:
        print('Usage: %s <要加入的词>'%(os.path.basename(__file__)))
        sys.exit(0)
    with codecs.open(duck_file, 'a', 'utf16') as fout:
        fout.write('\r\n')
        fout.write(sys.argv[1])
        print('加入新词<%s>的五笔编码'%sys.argv[1])